
var name = 'daxia';

function fn() {
    console.log(name); // ReferenceError: Cannot access 'name' before initialization
    let name = '666';
}

fn();